import request from "@/utils/request";

const ROLE_BASE_URL = "/core/sysModule";

const sysModuleAPI = {
  /*获取系统权限列表
   */
  getSysModuleList() {
    let query = encodeURIComponent(JSON.stringify({ pageNum: 1, pageSize: 10 }));
    return request<any, any[]>({
      url: `${ROLE_BASE_URL}/getSysModuleList?object=${query}`,
      method: "get",
    });
  },
  /** 新增获取更新权限*/
  updateSysModule() {
    return request<any, any>({
      url: `${ROLE_BASE_URL}/saveOrUpdateSysModule`,
      method: "post",
    });
  },
};

export default sysModuleAPI;
